package service;
import bean.Students;
import dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.List;

@Controller
public class StudentImpl {
    @Autowired
    StudentDao studentDao;

    public void addStudent(String unmber, String name, String gender, String clbum, String grade) {
        int add = studentDao.addStudent(unmber, name, gender, clbum, grade);
    }
    public void updateStudent(String unmber, String name, String gender, String clbum, String grade) {
        int update = studentDao.updateStudent(unmber, name, gender, clbum, grade);
    }
    public void deleteStudent(String name) {
        int delete = studentDao.deleteStudent(name);
    }
    public Students findStudent(String name) {
        return studentDao.selectStudentName(name);
    }
    public List<Students> findAll() {
        return studentDao.selectStudent();
    }
}
